<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html-el" prefix="html-el" %>
<%@taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean-el" %>
<%@taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic-el" %>

<html-el:form action="/login.do">
	<html-el:hidden property="method" value="login"/>
	<html-el:hidden property="screenWidth" value=""/>
	<html-el:hidden property="screenHeight" value=""/>
	
	<table style="width: 100%">
		<tr>
			<td align="center" valign="top">
				<!-- CONTENT -->			
				<div class="content">
					<table class="con">
						<tr>
							<td>	
								<table style="width:200px" class="formulario">
									<tr>
										<td width="50" class="label">Login:</td>
										<td class="inputField">
											<html-el:text property="usuario" styleId="usuario" size="15" maxlength="25" title="Usuário"/>
										</td>
									</tr>
									<tr>
										<td class="label">Senha:</td>
										<td class="inputField">
											<html-el:password property="senha" styleId="senha" size="15" maxlength="10" title="Senha"/>
										</td>
									</tr>
									<tr>
										<td colspan="2" class="buttons" align="right">
											<a href="javascript:login()" class="button">
												<span>Confirmar</span>
											</a>										
										</td>
									</tr>
								</table>							
							</td>
						</tr>						
					</table>	
				</div>	
			</td>
		</tr>
	</table>	
</html-el:form>
<script type="text/javascript">
	dojo.addOnLoad(function() {
		onFocus("usuario");
	});

	function login() {
		if(!mandatoryField('usuario'))
			return;
			
		if(!mandatoryField('senha'))
			return;
		
		document.forms[0].screenWidth.value = screen.width;
		document.forms[0].screenHeight.value = screen.height;
		document.forms[0].submit();
	}
</script>